import java.util.Scanner;
/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 04 - 16
 * Time: 15:46
 */
//模拟登陆
public class test5 {
    public static void main(String[] args) {
        String password = "12345";
        int flag = 0;
        while(flag < 3) {
            Scanner scan = new Scanner(System.in);
            String str = scan.next();
            if(!str.equals(password)) {
                flag++;
                System.out.println("密码错误");
            }else {
                System.out.println("登陆成功");
                break;
            }
        }
        if(flag == 3) {
            System.out.println("登录失败");
        }
    }
}
